<?php

declare(strict_types=1);

namespace app\admin\controller\coupon;

use app\admin\controller\Controller;
use app\model\CouponBrandCateRelation;
use app\Request;

class Relation extends Controller
{
         //添加关联
          public function addRelation(Request $request){
              $params = $request->only(['cate_id', 'brand_ids']);
              $data=CouponBrandCateRelation::addRelation($params,"add_relation");
              return $data;
          }

          //删除关联
          public function delRelation(Request $request){
              $params = $request->only(['cate_id', 'brand_id']);
              $data=CouponBrandCateRelation::delRelation($params,"del_relation");
              return $data;
          }
}
